package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 【请填写功能名称】对象 sap_data
 * 
 * @author ruoyi
 * @date 2025-02-05
 */
@Data
@Api(tags = "SapData对象", description = "SapData对象")
public class SapData
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long id;

    /** 生产订单号 */
    @Excel(name = "生产订单号")
    @ApiModelProperty(value = "生产订单号")
    private String orderNo;

    /** 物料号（原料号） */
    @Excel(name = "物料号", readConverterExp = "原=料号")
    @ApiModelProperty(value = "物料号（原料号）")
    private String ingreNo;


    /** 物料描述 */
    @Excel(name = "物料描述")
    @ApiModelProperty(value = "物料描述")
    private String ingreDesc;

    /** 工厂 */
    @Excel(name = "工厂")
    @ApiModelProperty(value = "工厂")
    private String plant;

    /** 工作中心 */
    @Excel(name = "工作中心")
    @ApiModelProperty(value = "工作中心")
    private String resource;

    /** 订单类型 */
    @Excel(name = "订单类型")
    @ApiModelProperty
    private String orderType;

    /** 产品版本 */
    @Excel(name = "产品版本")
    @ApiModelProperty("产品版本")
    private String productionVersion;

    /** 库存地点 */
    @Excel(name = "库存地点")
    @ApiModelProperty("库存地点")
    private String sloc;

    /** 供应区域 */
    @Excel(name = "供应区域")
    @ApiModelProperty("供应区域")
    private String supplyPlant;

    /** 批号（原材料） */
    @Excel(name = "批号", readConverterExp = "原=材料")
    @ApiModelProperty("批号（原材料）")
    private String batch;

    /** 数量 */
    @Excel(name = "数量")
    @ApiModelProperty("数量")
    private BigDecimal qty;

    /** 基本计量单位 */
    @Excel(name = "基本计量单位")
    @ApiModelProperty("基本计量单位")
    private String unit;
    @Excel(name = "备注")
    @ApiModelProperty("备注")
    private String remark;

    /** 工序号 */
    @Excel(name = "工序号")
    @ApiModelProperty("工序号")
    private String operation;

    /** 工步号 */
    @Excel(name = "工步号")
    @ApiModelProperty("工步号")
    private String step;

    /** 预留/相关需求的编号 */
    @Excel(name = "预留/相关需求的编号")
    @ApiModelProperty("预留/相关需求的编号")
    private int reserve1;

    /** 预留/相关需求的项目编号 */
    @Excel(name = "预留/相关需求的项目编号")
    @ApiModelProperty("预留/相关需求的项目编号")
    private int reserve2;

    /** 数据是最新1,不是最新0 */
    @Excel(name = "数据是最新1,不是最新0")
    @ApiModelProperty("数据是最新1,不是最新0")
    private Integer isEnable;

    /** 实际使用情况 */
    @Excel(name = "实际使用情况")
    @ApiModelProperty("实际使用情况")
    private Double actualUsage;

    /** 勾选框1 备料人员打勾 */
    @Excel(name = "勾选框1 备料人员打勾")
    @ApiModelProperty("勾选框1 备料人员打勾")
    private Integer check1;

    /** 勾选框2 投料人员打勾 */
    @Excel(name = "勾选框2 投料人员打勾")
    @ApiModelProperty("勾选框2 投料人员打勾")
    private Integer check2;
    @Excel(name = "创建时间")
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @Excel(name = "latxa1")
    @ApiModelProperty("latxa1")
    private String latxa1;
    @Excel(name = "plnnr")
    @ApiModelProperty("plnnr")
    private String plnnr;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }
    public void setIngreNo(String ingreNo) 
    {
        this.ingreNo = ingreNo;
    }

    public String getIngreNo() 
    {
        return ingreNo;
    }
    public void setIngreDesc(String ingreDesc) 
    {
        this.ingreDesc = ingreDesc;
    }

    public String getIngreDesc() 
    {
        return ingreDesc;
    }
    public void setPlant(String plant) 
    {
        this.plant = plant;
    }

    public String getPlant() 
    {
        return plant;
    }
    public void setResource(String resource) 
    {
        this.resource = resource;
    }

    public String getResource() 
    {
        return resource;
    }
    public void setOrderType(String orderType) 
    {
        this.orderType = orderType;
    }

    public String getOrderType() 
    {
        return orderType;
    }
    public void setProductionVersion(String productionVersion) 
    {
        this.productionVersion = productionVersion;
    }

    public String getProductionVersion() 
    {
        return productionVersion;
    }
    public void setSloc(String sloc) 
    {
        this.sloc = sloc;
    }

    public String getSloc() 
    {
        return sloc;
    }
    public void setSupplyPlant(String supplyPlant) 
    {
        this.supplyPlant = supplyPlant;
    }

    public String getSupplyPlant() 
    {
        return supplyPlant;
    }
    public void setBatch(String batch) 
    {
        this.batch = batch;
    }

    public String getBatch() 
    {
        return batch;
    }
    public void setQty(BigDecimal qty) 
    {
        this.qty = qty;
    }

    public BigDecimal getQty() 
    {
        return qty;
    }
    public void setUnit(String unit) 
    {
        this.unit = unit;
    }

    public String getUnit() 
    {
        return unit;
    }
    public void setOperation(String operation) 
    {
        this.operation = operation;
    }

    public String getOperation() 
    {
        return operation;
    }
    public void setStep(String step) 
    {
        this.step = step;
    }

    public String getStep() 
    {
        return step;
    }
    public void setReserve1(int reserve1)
    {
        this.reserve1 = reserve1;
    }

    public int getReserve1()
    {
        return reserve1;
    }
    public void setReserve2(int reserve2)
    {
        this.reserve2 = reserve2;
    }

    public int getReserve2()
    {
        return reserve2;
    }
    public void setIsEnable(Integer isEnable) 
    {
        this.isEnable = isEnable;
    }

    public Integer getIsEnable() 
    {
        return isEnable;
    }
    public void setActualUsage(Double actualUsage)
    {
        this.actualUsage = actualUsage;
    }

    public Double getActualUsage()
    {
        return actualUsage;
    }
    public void setCheck1(Integer check1) 
    {
        this.check1 = check1;
    }

    public Integer getCheck1() 
    {
        return check1;
    }
    public void setCheck2(Integer check2) 
    {
        this.check2 = check2;
    }

    public Integer getCheck2() 
    {
        return check2;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getOrderNo())
            .append("ingreNo", getIngreNo())
            .append("ingreDesc", getIngreDesc())
            .append("plant", getPlant())
            .append("resource", getResource())
            .append("orderType", getOrderType())
            .append("productionVersion", getProductionVersion())
            .append("sloc", getSloc())
            .append("supplyPlant", getSupplyPlant())
            .append("batch", getBatch())
            .append("qty", getQty())
            .append("unit", getUnit())
            .append("operation", getOperation())
            .append("step", getStep())
            .append("reserve1", getReserve1())
            .append("reserve2", getReserve2())
            .append("isEnable", getIsEnable())
            .append("actualUsage", getActualUsage())
            .append("check1", getCheck1())
            .append("check2", getCheck2())
            .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof SapData)) return false;

        SapData sapData = (SapData) o;

        if (getReserve1() != sapData.getReserve1()) return false;
        if (getReserve2() != sapData.getReserve2()) return false;
        if (getOrderNo() != null ? !getOrderNo().equals(sapData.getOrderNo()) : sapData.getOrderNo() != null)
            return false;
        if (getIngreNo() != null ? !getIngreNo().equals(sapData.getIngreNo()) : sapData.getIngreNo() != null)
            return false;
        if (getIngreDesc() != null ? !getIngreDesc().equals(sapData.getIngreDesc()) : sapData.getIngreDesc() != null)
            return false;
        if (getPlant() != null ? !getPlant().equals(sapData.getPlant()) : sapData.getPlant() != null) return false;
        if (getSloc() != null ? !getSloc().equals(sapData.getSloc()) : sapData.getSloc() != null) return false;
        if (getSupplyPlant() != null ? !getSupplyPlant().equals(sapData.getSupplyPlant()) : sapData.getSupplyPlant() != null)
            return false;
        if (getBatch() != null ? !getBatch().equals(sapData.getBatch()) : sapData.getBatch() != null) return false;
        if (getQty() != null ? (getQty().compareTo(sapData.getQty())==0? true:false): sapData.getQty() != null) return false;
        if (getUnit() != null ? !getUnit().equals(sapData.getUnit()) : sapData.getUnit() != null) return false;
        if (getOperation() != null ? !getOperation().equals(sapData.getOperation()) : sapData.getOperation() != null)
            return false;
        if (getStep() != null ? !getStep().equals(sapData.getStep()) : sapData.getStep() != null) return false;
        if (getLatxa1() != null ? !getLatxa1().equals(sapData.getLatxa1()) : sapData.getLatxa1() != null) return false;
        return getPlnnr() != null ? getPlnnr().equals(sapData.getPlnnr()) : sapData.getPlnnr() == null;
    }

    @Override
    public int hashCode() {
        int result = getOrderNo() != null ? getOrderNo().hashCode() : 0;
        result = 31 * result + (getIngreNo() != null ? getIngreNo().hashCode() : 0);
        result = 31 * result + (getIngreDesc() != null ? getIngreDesc().hashCode() : 0);
        result = 31 * result + (getPlant() != null ? getPlant().hashCode() : 0);
        result = 31 * result + (getSloc() != null ? getSloc().hashCode() : 0);
        result = 31 * result + (getSupplyPlant() != null ? getSupplyPlant().hashCode() : 0);
        result = 31 * result + (getBatch() != null ? getBatch().hashCode() : 0);
        result = 31 * result + (getQty() != null ? getQty().hashCode() : 0);
        result = 31 * result + (getUnit() != null ? getUnit().hashCode() : 0);
        result = 31 * result + (getOperation() != null ? getOperation().hashCode() : 0);
        result = 31 * result + (getStep() != null ? getStep().hashCode() : 0);
        result = 31 * result + getReserve1();
        result = 31 * result + getReserve2();
        result = 31 * result + (getLatxa1() != null ? getLatxa1().hashCode() : 0);
        result = 31 * result + (getPlnnr() != null ? getPlnnr().hashCode() : 0);
        return result;
    }
}
